package com.funny.live.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.funny.live.common.core.domain.BaseEntity;
import lombok.*;

import java.util.List;

/**
 * 书籍
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ToString
@TableName(value = "book")
public class Book extends BaseEntity {
    /**书籍id*/
    @TableId(type = IdType.AUTO)
    private Long bookId;

    /**书籍名称*/
    @TableField("book_name")
    private String bookName;

    /**作者*/
    @TableField("author")
    private String author;

    /**书籍简介*/
    @TableField("book_synopsis")
    private String bookSynopsis;

    /**书籍封面*/
    @TableField("book_cover")
    private String bookCover;

    /**状态（0正常1停用）*/
    @TableField("status")
    private String status;

    /**一本书籍对应多个类型**/
    @TableField(exist = false)
    private List<BookType> bookTypeList;
}
